@echo ON
@rem	DOWNLOAD VMAC APPLICATION

if %2.==. goto :END

del	CatmX.DLD

@REM	Add VMACSFT.DLD
@REM type c:\Softpay\spk2sim\source\VmacSft\sdsdebug\VMACSFT.DLD >> CatmX.DLD

if %2.==ADS. goto :ADS_FILE
if %2.==ads. goto :ADS_FILE
if %2.==SDS. goto :SDS_FILE
if %2.==sds. goto :SDS_FILE
goto :END

:ADS_FILE
@REM	Add CATM.DLD
type .\adsdebug\CATM.DLD >> CatmX.DLD
del  .\adsdebug\Catm.res
if %3.==PP. goto :ADS_PP_RES
copy .\adsdebug\RES\catm_npp.res .\adsdebug\Catm.res
goto :SHARE_FILE
:ADS_PP_RES
copy .\adsdebug\RES\catm_wpp.res .\adsdebug\Catm.res
goto :SHARE_FILE

:SDS_FILE
@REM	Add CATM.DLD
type .\sdsdebug\CATM.DLD >> CatmX.DLD
del  .\sdsdebug\Catm.res
if %3.==PP. goto :SDS_PP_RES
copy .\sdsdebug\RES\catm_npp.res .\sdsdebug\Catm.res
goto :SHARE_FILE
:SDS_PP_RES
copy .\sdsdebug\RES\catm_wpp.res .\sdsdebug\Catm.res
goto :SHARE_FILE

:SHARE_FILE
@REM	Add SHARED.DLD
type SHARED.DLD >> CatmX.DLD

@echo ON
ddl -p%1  -c  -b115200  -fCatmX.DLD
@echo OFF

:END
